# FROM python:3.9.16
# RUN sed -i 's/deb.debian.org/mirrors.ustc.edu.cn/g' /etc/apt/sources.list
# RUN sed -i 's/security.debian.org/mirrors.ustc.edu.cn/g' /etc/apt/sources.list
# RUN apt-get update
# RUN cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
# RUN apt install -y  vim wget curl iproute2 ntpdate  telnet traceroute  openssl libssl-dev libpcre3 libpcre3-dev  ntpdate  telnet traceroute gcc openssh-server  ntpdate tcpdump telnet traceroute iotop unzip zip openjdk-11-jdk
# RUN mkdir /data /log; \
#     pip3 install setuptools -i https://pypi.tuna.tsinghua.edu.cn/simple ; \
#     pip3 install --upgrade pip -i https://pypi.tuna.tsinghua.edu.cn/simple;
# CMD /bin/bash

# 注意，这个是私有hub
FROM python:3.10-slim
# 工作目录
WORKDIR /data
# 复制本地主机的 . 下内容到镜像中的 . ，目标路径不存在时，会自动创建。
COPY . .
# 执行shell 命令，安装环境
ENV PYTHONPATH src
RUN pip3 install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple
# 启动服务。
CMD ["python3", "./src/server.py"]
